package cn.shadowsouls.system.bean;

import cn.shadowsouls.common.exception.DefinitionException;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 注册的数据类
 *
 * @author shadowsouls
 * @version 1.0
 */

@ApiModel(value = "注册数据")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterData {

    @ApiModelProperty(value = "用户名", example = "shadowu")
    private String username;
    @ApiModelProperty(value = "密码", example = "124")
    private String password;
    @ApiModelProperty(value = "确认密码", example = "124")
    private String rpassword;
    @ApiModelProperty(value = "邮箱", example = "124@qq.com")
    private String email;

    public boolean validData(){
        // if (this.password.equals(rpassword)){
        //     throw new DefinitionException(500,"密码无效");
        // }
        return true;
    }
}
